// // pages/poster/poster.js


Page({
  data: {
    choose: 'poster',
    navList: [
      {
        title: '今日推荐',
        id: 'poster'
      },
      {
        title: '日签',
        id: '1'
      },
      {
        title: '招募',
          id: '2'
      },
      {
        title: '日签',
        id: '3'
      },
      {
        title: '日签',
        id: '4'
      },
      {
        title: '日签',
        id: '5'
      },
      {
        title: '日签',
        id: '6'
      },
      {
        title: '日签',
        id: '7'
      },
    ],
    imgUrls: [
      'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
      'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
      'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg'
    ],
    indicatorDots: false,
    autoplay: false,
    interval: 5000,
    duration: 1000,
    swiperIndex: 0,
    showWhich: 'poster',
    listData: ['','','']
  },
  skip(e){
    let item = e.currentTarget.dataset.item;
    let showWhich = ''
    if(item.id == 'home'){
      showWhich = 'poster'
    }else{
      showWhich = 'list'
    }
    this.setData({
      showWhich: item.id
    })
  },
  swiperChange(e) {
    const that = this;
    that.setData({
      swiperIndex: e.detail.current,
    })
  }
})